<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">

<head th:include="include :: header"></head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12 col-md-12 col-sm-12">
            <div class="ibox">
                <div class="ibox-title" style="padding-bottom: 0;">
                    <h3 class="text-center">新增商品中心</h3>
                    <div class="gg-nav">
                        <ul class="nav nav-tabs">
                            <li class="active"><a href="#basic_info" data-toggle="tab">基本资料</a></li>
                            <li><a href="#photo_info" data-toggle="tab">图文详情</a></li>
                            <li><a href="#jg_info" data-toggle="tab">价格管理</a></li>
                            <li><a href="#kucun_info" data-toggle="tab">库存管理</a></li>
                        </ul>
                    </div>
                </div>
                <div class="tab-content">
                    <!--basic info-->
                    <div class="ibox-content tab-pane fade in active"  id="basic_info">
                        <form class="form-horizontal m-t" id="signupForm">
                            <div class="form-group">
                                <label class="col-sm-3 control-label"><span style="color:red">*</span>编号：</label>
                                <div class="col-sm-8">
                                    <input id="serialnumber" name="serialnumber" class="form-control" type="text" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label"><span style="color:red">*</span>商品名称：</label>
                                <div class="col-sm-8">
                                    <input id="productname" name="productname" class="form-control" type="text" >
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label"><span style="color:red">*</span>单位：</label>
                                <div class="col-sm-8">
<!--                                    <input id="basicunitid" name="basicunitid" class="form-control" type="text" >-->
                                        <select name="basicunitid" id="basicunitid" class="form-control">
                                             <option th:each="units,userStat:${unitNameList}" th:value="${units.id}" th:text="${units.unitname}"></option>
                                        </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">单位重量：</label>
                                <div class="col-sm-8">
                                    <input id="unitweight" name="unitweight" class="form-control" type="text">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label"><span style="color:red">*</span>商品类别：</label>
                                <div class="col-sm-8">
                                    <input id="classifyid" name="classifyid" class="hidden"> <input
                                        id="typename" name="typename" class="form-control" type="text"
                                        style="cursor: pointer;" onclick="openGoodstype()"
                                        readonly="readonly" placeholder="所属类别" >
                                    <!--<input id="classifyid" name="classifyid" class="form-control" type="text">-->
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">规格：</label>
                                <div class="col-sm-8">
                                    <input id="specification" name="specification" class="form-control" type="text">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">商品状态:</label>
                                <div class="col-sm-8">
                                    <label class="radio-inline"> <input type="radio"
                                                                        name="ifstart" value="1" /> 启用
                                    </label> <label class="radio-inline"> <input type="radio"
                                                                                 name="ifstart" value="0" /> 停用
                                </label>
                                </div>
                            </div>
                            <div class="form-group">
                                <input id="detail" name="detail" type="hidden">
                                <label class="col-sm-3 control-label">商品详情：</label>
                                <div class="col-sm-11">
                                    <div class="ibox-content no-padding">
                                        <div id="detail_sn" class="summernote"></div>
                                    </div>
                                </div>
                                <!--<div class="col-sm-8">
                                    <input id="detail" name="detail" class="form-control" type="text">
                                </div>-->
                            </div>


                    </div>
                    <!--photo_info-->
                    <div class="ibox-content tab-pane fade gg" id="photo_info">
                        <div class="ggcontainer" id="crop-avatar">
                            <div class="file-manager">
                                <button type="button" class="layui-btn" id="test1">
                                    <i class="fa fa-cloud"></i>上传文件
                                </button>
                                <div class="hr-line-dashed"></div>
                            </div>
                            <!-- Loading state -->
                            <div class="loading" aria-label="Loading" role="img" tabindex="-1"></div>
                        </div>
                    </div>
                    <!--jg_info-->
                    <div class="ibox-content tab-pane fade in active"  id="jg_info">
                        <table data-mobile-responsive="true">
                            <tr>
                                <td>价格类别</td>
                                <td>价格</td>
                            </tr>
                            <tr>
                                <td>零售价（元）</td>
                                <td><input id="retailprice"  name="retailprice" class="form-control" type="text"></td>
                            </tr>
                            <tr>
                                <td>批发价价（元）</td>
                                <td><input id="beginprice" name="beginprice" class="form-control" type="text"></td>
                            </tr>
                            <tr>
                                <td>最低售价（元）</td>
                                <td><input id="minprice" name="minprice" class="form-control" type="text" ></td>
                            </tr>
                            <tr>
                                <td>参考进货价（元）</td>
                                <td><input id="readprice" name="readprice" class="form-control" type="text"></td>
                            </tr>
                        </table>
                    </div>
                    <!--kucun_info-->
                    <div class="ibox-content tab-pane fade in active"  id="kucun_info">
                        <table data-mobile-responsive="true">
                            <p><span style="font-size: 14px">期初库存</span>（在启用本软件前仓库中已有的商品库存，录入期初库存可以使后续成本价、毛利等值的计算更准确；）</p>
                            <tr>
                                <td>仓库</td>
                                <td>期初库存量</td>
                                <td>期初成本价（元）</td>
                                <td>期初总金额（元）</td>
                                <td>备注</td>
                            </tr>
                            <tr>
                                <td>默认仓库</td>
                                <td><input id="beginrepertory"  name="beginrepertory" class="form-control" type="text"></td>
                                <td><input id="begincostprice" name="begincostprice" class="form-control" type="text"></td>
                                <td><input id="beginallprice" name="beginallprice" class="form-control" type="text"></td>
                                <td><input class="form-control" type="text"></td>
                            </tr>
                        </table>
                        <hr/>
                        <table>
                        <p><span style="font-size: 14px">库存预警</span>所有仓库预警值相同</p>
                        <tr>
                            <td>仓库</td>
                            <td>最低库存量</td>
                            <td>最高库存量（元）</td>
                        </tr>
                        <tr>
                            <td>默认仓库</td>
                            <td><input id="minrepertory" name="minrepertory" class="form-control" type="text"></td>
                            <td><input id="maxrepertory" name="maxrepertory" class="form-control" type="text"></td>
                        </tr>
                        </table>
                    </div>

                </div>
                <div class="form-group">
                    <div class="col-sm-8 col-sm-offset-3">
                        <button type="submit" class="btn btn-primary" >提交</button>
                    </div>
                </div>
                </form>
            </div>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript" src="/js/appjs/goods/goods/add.js">
</script>
</body>
</html>
